﻿using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;

namespace BrandonHaynes.Providers.ControlPanel
    {
    internal static class Extensions
        {
        /// <summary>
        /// Converts a name-value collection to a dictionary
        /// </summary>
        public static IDictionary<string, string> ToDictionary(this NameValueCollection collection)
            { return collection.AllKeys.ToDictionary(key => key, key => collection[key]); }
        }
    }